{% extends "template_base.html" %}
{% load filters %}
{% block imports %}
        <link rel="stylesheet" type="text/css" href="{% url ol-root %}styles/admin/style.css" />
        
        <!-- TinyMCE library -->
		<script type="text/javascript" src="{% url ol-root %}javascript/jquery/plugins/tinymce/jscripts/tiny_mce/jquery.tinymce.js"></script>
		<script type="text/javascript" src="{% url ol-root %}javascript/jquery/plugins/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
        
        <!-- open labyrinth admin library -->
        <script type="text/javascript" src="{% url ol-root %}javascript/admin.js"></script>
{% endblock %}

{% block body %}
        <div id="adminMenu">
            <div class="panelHeader">
                <strong>Main Menu</strong>
            </div>
            <table>
                {% if labyrinth %}
                <tr>
                    <td>
                        <a href="{{ labyrinth.get_absolute_url }}visualEditor/">Visual Editor</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="{{ labyrinth.get_absolute_url }}nodes/">Nodes</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="{{ labyrinth.get_absolute_url }}counters/">Counters</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="{{ labyrinth.get_absolute_url }}reports/">Reports</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="{{ labyrinth.get_absolute_url }}feedback/">Feedback</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="{{ labyrinth.get_absolute_url }}questions/">Questions</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="{{ labyrinth.get_absolute_url }}avatars/">Avatars</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="{{ labyrinth.get_absolute_url }}remoteStateObservers/">RSOs</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="{{ labyrinth.get_absolute_url }}assets/">Assets</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="{{ labyrinth.get_absolute_url }}clusters/">Clusters</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="{{ labyrinth.get_absolute_url }}elements/">Elements</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="{{ labyrinth.get_absolute_url }}sections/">Sections</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="{{ labyrinth.get_absolute_url }}update/">Options</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="{% url ol-root %}labyrinth/{{ labyrinth.id }}/" target="_blank">Preview</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="{{ labyrinth.get_absolute_url }}export">Export</a>
                    </td>
                </tr>
                {% endif %}
                <tr>
                    <td>
                        <a href="{% url ol-adminRoot %}users">Users</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="{% url ol-adminRoot %}skins">Skins</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="{% url ol-adminRoot %}labyrinths">Labyrinths</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="{% url ol-adminRoot %}">Administration</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="{% url ol-root %}logout">Logout</a>
                    </td>
                </tr>
            </table>
        </div>
        <div id="pageContent">
            <h2>
                {% block pageTitle %}
                    {% if form.instance.id %}
                        {% if object_name %}
                            Update {{ object_name }} ({{ form.instance.id }})
                        {% else %}
                            Update {{ form|className }} ({{ form.instance.id }})
                        {% endif %}
                    {% endif %}
                    {% if not form.instance.id and form %}
                        {% if object_name %}
                            Create {{ object_name }}
                        {% else %}
                            Create {{ form|className }}
                        {% endif %}
                    {% endif %}
                {% endblock %}            
            </h2>
            {% block pageContent %}
            {% endblock %}
        </div>
        <form method="POST" id="adminForm">
            <input type="hidden" name="action" value="delete">
        </form>
{% endblock %}